package com.shopcart.controller;

import javax.ejb.Remote;
import com.shopcart.entity.Customer;
import com.shopcart.exception.CustomerExistsException;
import com.shopcart.exception.CustomerIsLoginedException;
import com.shopcart.exception.NoSuchCustomerExistsException;
import com.shopcart.exception.PasswordMismatchException;

@Remote
public interface CustomerController {

	Customer registerCustomer(String email, String password, String name,
			String surname) throws CustomerExistsException;

	Customer loginCustomer(String username, String password)
			throws NoSuchCustomerExistsException,
			CustomerIsLoginedException, PasswordMismatchException;

	void logoutCustomer(Customer customer);
	
	Customer addNotExistingProduct(Customer customer, Long productId);
	Customer deleteNotExistingProduct(Customer customer, Long productId);
}